package com.haixiaoke.saas.lock.mapper;

import com.haixiaoke.saas.lock.domain.LockFace;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 锁人脸授权Mapper接口
 * 
 * @author panda
 * @date 2025-06-26
 */
public interface LockFaceMapper {
    /**
     * 查询锁人脸授权
     * 
     * @param faceId 锁人脸授权主键
     * @return 锁人脸授权
     */
    LockFace selectLockFaceByFaceId(Long faceId);

    /**
     * 查询锁人脸授权列表
     * 
     * @param lockFace 锁人脸授权
     * @return 锁人脸授权集合
     */
    List<LockFace> selectLockFaceList(LockFace lockFace);

    /**
     * 新增锁人脸授权
     * 
     * @param lockFace 锁人脸授权
     * @return 结果
     */
    int insertLockFace(LockFace lockFace);

    /**
     * 修改锁人脸授权
     * 
     * @param lockFace 锁人脸授权
     * @return 结果
     */
    int updateLockFace(LockFace lockFace);

    /**
     * 删除锁人脸授权
     * 
     * @param faceId 锁人脸授权主键
     * @return 结果
     */
    int deleteLockFaceByFaceId(Long faceId);

    /**
     * 批量删除锁人脸授权
     * 
     * @param faceIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteLockFaceByFaceIds(Long[] faceIds);

    List<Map<String, Object>> checkNameAndPhone(LockFace lockFace);

    /**
     * 批量新增锁人脸授权
     * @param lockFaceList
     * @return
     */
    int insertBatchLockFace(List<LockFace> lockFaceList);

    int deleteLockFaceByLockId(Long lockId);

    int updateLockFaceByImage(LockFace lockFace);

    LockFace selectLockFaceByLockIdAndUserId(@Param("lockId") Long lockId, @Param("conUserId") Long conUserId);

    LockFace selectLockFaceByLockIdAndUserName(@Param("lockId") Long lockId, @Param("userName") String userName);

    List<LockFace> selectLockListByIdentifications(List<String> identifications);
}
